package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Permission;
import cn.wolfcode.crm.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PermissionMapper {

    int insert(Permission entity);
    List<String> selectAllName();

    int queryForCount();

    List<Permission> queryForList(QueryObject qo);

    List<Permission> selectAll();

    void insertRelationPermission(@Param("RoleId") Long RoleId, @Param("PermissionId") Long PermissionId);

    List<Permission> queryByRoleId(Long id);

    List<String> listResourcesByEmployeeId(Long id);

    List<String> listPermissionByOperatorId(Long id);

    List<Long> selectPermissionByRoleId(Long roleId);

    void deleteRelation(@Param("roleId") Long roleId);

    List<Long> listIdsByOperatorId(Long operatorId);
}